<?php

Class Article_chunk_to {
	
	private $article_list;
	private $more;
	
	public function __construct($article_list, $more) {
		$this->article_list = $article_list;
		$this->more = $more;
	}
	
	public function get_article_list() {
		return $this->article_list;
	}
	
	public function get_more() {
		return $this->more;
	}
	
	public function equals($object) {
		if ((get_class($this) != get_class($object)) ||
				($object == null))				
			 return false;
		else {
			if (($this->article_list == $object->get_article_list()) &&
				($this->more = $object->get_more()))
				return true;
			return false;
		}
	}
	
	public function to_string() {
		$string = 'Article_chunk:</br>';		
		if (!$this->article_list == NULL) {		
			$string = $string . 'article list:</br>';		
			foreach ($this->article_list as $article) 
				$string = $string . $article->to_string() . '</br>';
		}
		$string = $string . 'more: ';
		if ($this->more)
			$string = $string . 'true';
		else 
			$string = $string . 'false';
		
		return $string;						
	}

}

?>